home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 95 / MOBICLIC 95.ISO / mac / MWB_DATA / TCH095 / TCH095_00 / TCH095_00.swf / scripts / frame_4 / DoAction.as
Text File  |  2007-06-28  |  750b  |  42 lines

  1. function joueSon(my_MC, lListeSons, lNomSon, lFaitAvancer)
  2. {
  3.    lPosSon = getPos(lListeSons,lNomSon);
  4.    my_MC.gSonJoue = lPosSon;
  5.    if(my_MC["my_comment_" + lPosSon] != undefined)
  6.    {
  7.       my_MC["my_comment_" + lPosSon].start();
  8.       if(lFaitAvancer === 1)
  9.       {
  10.          my_MC.gotoAndPlay(my_MC._currentframe + 1);
  11.       }
  12.    }
  13. }
  14. function gimme2digits(X)
  15. {
  16.    if(X < 10)
  17.    {
  18.       lX = "0" + String(X);
  19.    }
  20.    else
  21.    {
  22.       lX = String(X);
  23.    }
  24.    return lX;
  25. }
  26. function getPos(lList, lValue)
  27. {
  28.    lPresent = -1;
  29.    i = 0;
  30.    while(i <= lList.length)
  31.    {
  32.       if(lList[i] == lValue)
  33.       {
  34.          lPresent = i;
  35.       }
  36.       i++;
  37.    }
  38.    return lPresent;
  39. }
  40. gListeSons = gListST;
  41. gSonJoue = 0;
  42.